CC = gcc
CFLAGS = -O3

COMMONMAKE := /home/faculty/asriniva/courses/PC10/code/GPU.mk
include $(COMMONMAKE)

INCLUDE = -I./include
COMPRESS = ./bin/compress
DECOMPRESS = ./bin/decompress

all: compress decompress

./bin/compress.cu_o: ./src/compress.cu $(COMMONMAKE)
	$(NVCC) $(NVCCFLAGS) $(INCLUDES) $(INCLUDE) -o ./bin/compress.cu_o -c ./src/compress.cu 

compress: ./bin/compress.cu_o $(COMMONMAKE)
	$(LINK) -o $(COMPRESS) ./bin/compress.cu_o $(LIBS)

./bin/compress_old.cu_o: ./src/compress_old.cu $(COMMONMAKE)
	$(NVCC) $(NVCCFLAGS) $(INCLUDES) $(INCLUDE) -o ./bin/compress_old.cu_o -c ./src/compress_old.cu 

compress_old: ./bin/compress_old.cu_o $(COMMONMAKE)
	$(LINK) -o ./bin/compress_old ./bin/compress_old.cu_o $(LIBS)

./bin/decompress.cu_o: ./src/decompress.cu $(COMMONMAKE)
	$(NVCC) $(NVCCFLAGS) $(INCLUDES) $(INCLUDE) -o ./bin/decompress.cu_o -c ./src/decompress.cu 

decompress: ./bin/decompress.cu_o $(COMMONMAKE)
	$(LINK) -o ./bin/decompress ./bin/decompress.cu_o $(LIBS)

docs:
	doxygen doxygen_config
	
clean:
	rm -rf *~ ./bin/* ./docs/* ./output/* ./src/*~ ./include/*~


	
